const list = document.querySelectorAll('.gl-item')

const goodsList =Array.from(list).map(item=>{
    const goodsName = item.querySelector('.p-name').innerText.split(" ")[0]
    const goodsPrice = item.querySelector('div.p-price>strong>i')?.innerText
    const goodsImage = item.querySelector('.p-img img').src
    return {
        goodsName,
        // goodsPrice,
        goodsImage
    }
}).filter(item=>item.goodsImage!='' && item.goodsName!='')



console.log(JSON.stringify(goodsList))

